package cn.tannn.ops.pwd.controller.vo;

import cn.tannn.ops.pwd.enums.EncryptType;
import cn.tannn.ops.pwd.enums.KeePassStatus;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;


/**
 * 密码管理器VO
 *
 * @author tnnn
 * @version V1.0
 * @date 2023-02-20 09:28
 */
@Getter
@Setter
@ToString
public class KeePassVO {

    /**
     * id
     */
    @Schema(description = "id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 分组
     */
    @Schema(description = "分组")
    String groupings;

    /**
     * 密码标题
     */
    @Schema(description = "密码标题")
    String title;

    /**
     * 用户名
     */
    @Schema(description = "用户名")
    String username;

    /**
     * 加密后的密码
     */
    @Schema(description = "加密后的密码")
    String password;

    /**
     * 密码相关地址
     */
    @Schema(description = "密码相关地址")
    String url;

    /**
     * 备注
     */
    @Schema(description = "备注")
    String remark;

    /**
     * 加密方式
     */
    @Schema(description = "加密方式")
    EncryptType encryptType;

    /**
     * 状态 VALID("有效"), RECYCLED("回收站");
     *
     * @see KeePassStatus
     */
    @Schema(description = "状态 VALID(\"有效\"), RECYCLED(\"回收站\");")
    KeePassStatus status;


}
